﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sparkle.Lib.Attributes
{
    public sealed class DisplayAttribute : Attribute
    {
        // Summary:
        //     Initializes a new instance of the System.ComponentModel.DataAnnotations.DisplayAttribute
        //     class.
        public DisplayAttribute()
        { ;}

        // Summary:
        //     Gets or sets a value that indicates whether the field is automatically displayed
        //     in the user interface.
        //
        // Returns:
        //     true if the field is automatically displayed in the user interface; otherwise,
        //     false.
        //
        // Exceptions:
        //   System.InvalidOperationException:
        //     The property does not contain a value when trying to retrieve the value.
        public bool AutoGenerateField { get; set; }
        //
        // Summary:
        //     Gets or sets a value that indicates whether filtering is automatically displayed
        //     for this field.
        //
        // Returns:
        //     true if filtering is automatically displayed; otherwise, false.
        //
        // Exceptions:
        //   System.InvalidOperationException:
        //     The property does not contain a value when trying to retrieve the value.
        public bool AutoGenerateFilter { get; set; }
        //
        // Summary:
        //     Gets or sets either a resource name or non-localized text, such as a tool
        //     tip, that is displayed to users to help them understand a member.
        //
        // Returns:
        //     Either a resource name or the non-localized text to display to users to help
        //     them understand a member. The resource name is used with the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property to retrieve localized text to display to users to help them understand
        //     a member.
        public string Description { get; set; }
        //
        // Summary:
        //     Gets or sets either a resource name or non-localized text that is displayed
        //     to users when grouping fields in the user interface.
        //
        // Returns:
        //     Either a resource name or the non-localized text that is displayed to users
        //     when grouping fields in the user interface. The resource name is used with
        //     the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType property
        //     to retrieve localized text that is displayed to users when grouping fields
        //     in the user interface.
        public string GroupName { get; set; }
        //
        // Summary:
        //     Gets or sets either a resource name or non-localized text that is used as
        //     a member label for elements that are bound to the member.
        //
        // Returns:
        //     Either a resource name or the non-localized text that is used as a member
        //     label for elements that are bound to the member. The resource name is used
        //     with the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property to retrieve localized text that is used as a member label for elements
        //     that are bound to the member.
        public string Name { get; set; }
        //
        // Summary:
        //     Gets or sets a value that indicates the order in which columns are sorted.
        //
        // Returns:
        //     A value that indicates the order in which columns are sorted.
        //
        // Exceptions:
        //   System.InvalidOperationException:
        //     The get accessor is called when the System.ComponentModel.DataAnnotations.DisplayAttribute.Order
        //     property has not been set.
        public int Order { get; set; }
        //
        // Summary:
        //     Gets or sets either a resource name or non-localized text, such as a watermark,
        //     that suggests a user action for an element that is bound to the member.
        //
        // Returns:
        //     Either a resource name or the non-localized text that suggests a user action
        //     for an element that is bound to the member. The resource name is used with
        //     the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType property
        //     to retrieve localized text that suggests a user action for an element that
        //     is bound to the member.
        public string Prompt { get; set; }
        //
        // Summary:
        //     Gets or sets the type that contains the resources for other localizable property
        //     values.
        //
        // Returns:
        //     The type that contains the resources for other localizable property values.
        public Type ResourceType { get; set; }
        //
        // Summary:
        //     Gets or sets either a resource name or non-localized text that is used as
        //     the column label for an element that is bound to the member.
        //
        // Returns:
        //     Either a resource name or the non-localized text that is used as the column
        //     label for an element that is bound to the member.
        public string ShortName { get; set; }

        // Summary:
        //     Retrieves the value of the System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateField
        //     property.
        //
        // Returns:
        //     The value of the System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateField
        //     property when the property has been set, or null if the property has not
        //     been set.
        public bool? GetAutoGenerateField()
        { 
            return AutoGenerateField;
        }
        //
        // Summary:
        //     Retrieves the value of the System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateFilter
        //     property.
        //
        // Returns:
        //     The value of the System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateFilter
        //     property if the property has been set, or null if the property has not been
        //     set.
        public bool? GetAutoGenerateFilter()
        { return AutoGenerateFilter ;}
        //
        // Summary:
        //     Retrieves the localized or non-localized value of the System.ComponentModel.DataAnnotations.DisplayAttribute.Description
        //     property.
        //
        // Returns:
        //     The localized value for the description when the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property is specified and the System.ComponentModel.DataAnnotations.DisplayAttribute.Description
        //     property represents a resource name; otherwise, the non-localized value specified
        //     in the System.ComponentModel.DataAnnotations.DisplayAttribute.Description
        //     property.
        public string GetDescription()
        { return Description ;}
        //
        // Summary:
        //     Retrieves the localized or non-localized value of the System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName
        //     property.
        //
        // Returns:
        //     The localized value for the group name when the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property is specified and the System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName
        //     property represents a resource name; otherwise, the non-localized value specified
        //     in the System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName property.
        public string GetGroupName()
        { 
            return GroupName ;
        }
        //
        // Summary:
        //     Retrieves the localized or non-localized value of the System.ComponentModel.DataAnnotations.DisplayAttribute.Name
        //     property.
        //
        // Returns:
        //     The localized value for the group name when the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property is specified and the System.ComponentModel.DataAnnotations.DisplayAttribute.Name
        //     property represents a resource name; otherwise, the non-localized value specified
        //     in the System.ComponentModel.DataAnnotations.DisplayAttribute.Name property.
        public string GetName()
        { 
            return Name ;
        }
        //
        // Summary:
        //     Retrieves the value of the System.ComponentModel.DataAnnotations.DisplayAttribute.Order
        //     property.
        //
        // Returns:
        //     The value of the System.ComponentModel.DataAnnotations.DisplayAttribute.Order
        //     property if the property is set, or null if the property is not set.
        public int? GetOrder()
        { 
            return Order;
        }
        //
        // Summary:
        //     Retrieves the localized or non-localized value of the System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt
        //     property.
        //
        // Returns:
        //     The localized value for the group name when the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property is specified and the System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt
        //     property represents a resource name; otherwise, the non-localized value specified
        //     in the System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt property.
        public string GetPrompt()
        {
            return Prompt;
        }
        //
        // Summary:
        //     Retrieves the localized or non-localized value of the System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName
        //     property.
        //
        // Returns:
        //     The localized value for the group name when the System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType
        //     property is specified and the System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName
        //     property represents a resource name; otherwise, the non-localized value specified
        //     in the System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName property.
        public string GetShortName()
        {
            return ShortName;
        }
    }
}
